package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysDiagnosisDetailMapper;
import com.ruoyi.system.domain.SysDiagnosisDetail;
import com.ruoyi.system.service.ISysDiagnosisDetailService;

/**
 * 诊断详细记录Service业务层处理
 * 
 * @author baimei
 * @date 2022-06-12
 */
@Service
public class SysDiagnosisDetailServiceImpl implements ISysDiagnosisDetailService 
{
    @Autowired
    private SysDiagnosisDetailMapper sysDiagnosisDetailMapper;

    /**
     * 查询诊断详细记录
     * 
     * @param companyId 诊断详细记录主键
     * @return 诊断详细记录
     */
    @Override
    public SysDiagnosisDetail selectSysDiagnosisDetailByCompanyId(Long companyId)
    {
        return sysDiagnosisDetailMapper.selectSysDiagnosisDetailByCompanyId(companyId);
    }

    @Override
    public SysDiagnosisDetail selectSysDiagnosisDetailByIds(SysDiagnosisDetail sysDiagnosisDetail) {
        return sysDiagnosisDetailMapper.selectSysDiagnosisDetailByIds(sysDiagnosisDetail);
    }

    /**
     * 查询诊断详细记录列表
     * 
     * @param sysDiagnosisDetail 诊断详细记录
     * @return 诊断详细记录
     */
    @Override
    public List<SysDiagnosisDetail> selectSysDiagnosisDetailList(SysDiagnosisDetail sysDiagnosisDetail)
    {
        return sysDiagnosisDetailMapper.selectSysDiagnosisDetailList(sysDiagnosisDetail);
    }

    /**
     * 新增诊断详细记录
     * 
     * @param sysDiagnosisDetail 诊断详细记录
     * @return 结果
     */
    @Override
    public int insertSysDiagnosisDetail(SysDiagnosisDetail sysDiagnosisDetail)
    {
        return sysDiagnosisDetailMapper.insertSysDiagnosisDetail(sysDiagnosisDetail);
    }

    /**
     * 修改诊断详细记录
     * 
     * @param sysDiagnosisDetail 诊断详细记录
     * @return 结果
     */
    @Override
    public int updateSysDiagnosisDetail(SysDiagnosisDetail sysDiagnosisDetail)
    {
        sysDiagnosisDetail.setUpdateTime(DateUtils.getNowDate());
        return sysDiagnosisDetailMapper.updateSysDiagnosisDetail(sysDiagnosisDetail);
    }

    /**
     * 批量删除诊断详细记录
     * 
     * @param companyIds 需要删除的诊断详细记录主键
     * @return 结果
     */
    @Override
    public int deleteSysDiagnosisDetailByCompanyIds(Long[] companyIds)
    {
        return sysDiagnosisDetailMapper.deleteSysDiagnosisDetailByCompanyIds(companyIds);
    }

    /**
     * 删除诊断详细记录信息
     * 
     * @param companyId 诊断详细记录主键
     * @return 结果
     */
    @Override
    public int deleteSysDiagnosisDetailByIds(SysDiagnosisDetail sysDiagnosisDetail)
    {
        return sysDiagnosisDetailMapper.deleteSysDiagnosisDetailByIds(sysDiagnosisDetail);
    }
}
